package exsun.jt808.data.distribute_data.jt808;

import com.alibaba.fastjson.JSONObject;
import exsun.jt808.data.distribute_data.DistributeEntity;

import java.io.Serializable;

public class TextSend extends DistributeEntity implements Serializable {

    /**
     * 文本类型
     */
    private int textType;

    /**
     * 01：服务 10：紧急 11：通知
     */
    private int signType;

    /**
     * 紧急
     */
    private boolean urgency;
    /**
     * 终端显示器显示
     */
    private boolean terminalDisplay;
    /**
     * 终端 TTS 播读
     */
    private boolean ttsPlay;
    /**
     * 广告屏显示
     */
    private boolean screenDisplay;
    /**
     * 0：中心导航信息，1：CAN 故障码信息
     */
    private int msgType;
    /**
     * 文本信息
     */
    private String content;

    private  long operationTime=0;

    public  long getOperationTime()
    {
        return  this.operationTime;
    }
    public  void setOperationTime(long operationTime ) {
        this.operationTime = operationTime;
    }

    public int getTextType() {
        return textType;
    }

    public void setTextType(int textType) {
        this.textType = textType;
    }

    public int getSignType() {
        return signType;
    }

    public void setSignType(int signType) {
        this.signType = signType;
    }

    public boolean isUrgency() {
        return urgency;
    }

    public void setUrgency(boolean urgency) {
        this.urgency = urgency;
    }

    public boolean isTerminalDisplay() {
        return terminalDisplay;
    }

    public void setTerminalDisplay(boolean terminalDisplay) {
        this.terminalDisplay = terminalDisplay;
    }

    public boolean isTtsPlay() {
        return ttsPlay;
    }

    public void setTtsPlay(boolean ttsPlay) {
        this.ttsPlay = ttsPlay;
    }

    public boolean isScreenDisplay() {
        return screenDisplay;
    }

    public void setScreenDisplay(boolean screenDisplay) {
        this.screenDisplay = screenDisplay;
    }

    public int getMsgType() {
        return msgType;
    }

    public void setMsgType(int msgType) {
        this.msgType = msgType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public JSONObject toJSONString() {

        JSONObject object = new JSONObject();
        object.put("textType",textType);
        object.put("signType",signType);
        object.put("urgency",urgency);
        object.put("terminalDisplay",terminalDisplay);
        object.put("ttsPlay",ttsPlay);
        object.put("screenDisplay",screenDisplay);
        object.put("msgType",msgType);
        object.put("content",content);
        return object;
    }

}
